<?php
    
    if(!$usaMesmaConexao){
	require_once '../include.php';
	$conexao = new Conexao();
    }
    
    $id_usuario = $_SESSION['usuario']['id'];
    
    $query = "SELECT * FROM posicao WHERE id_usuario = $id_usuario ORDER BY idPosicao DESC";
    
    $result = mysql_query($query);    
    
    while ($row = mysql_fetch_array($result)) {
	extract($row);
	
	$checked = "";
	if($inicial == "1"){
	    $checked = "checked='checked'";
	}
	
	?>
	    <input name="default" <?=$checked?> onclick="mudaPosicaoPadrao(<?=$idPosicao?>)" type="radio" value="<?=$idPosicao?>" />
	    <a href="javascript:void(0)" onclick="mudaPosicao(<?=$zoom?>,<?=$lat?>,<?=$lng?>)"><?=$nome?></a>
	    <a href="javascript:void(0)" onclick="deletePosicao(<?=$idPosicao?>)">remover</a><br/>
	<?    
    }
    
?>
